<%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ include file="/init.jsp" %>

<%
	ResultRow row = (ResultRow) request.getAttribute( WebKeys.SEARCH_CONTAINER_RESULT_ROW);
	hoso hs  = (hoso) row.getObject();
	long groupId = themeDisplay.getScopeGroupId();
	String name = hoso.class.getName();
	String primKey = String.valueOf(hs.getPrimaryKey());
	
	String userId = String.valueOf(hs.getUserId()) ;
// 	boolean hasUsername = hs.getCotendangnhap();
// 	String profileId = userRow.getExpandoBridge().getAttribute("idHoso").toString();
%>
<liferay-ui:icon-menu message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions","Tac vu") %>'>
    
    <portlet:renderURL windowState="normal" var="updateProfileURL">
      <portlet:param name="idHoso" value="<%= primKey %>" />
      <portlet:param name="jspPage" value="/html/manage_employee/employee/edit_profile.jsp"></portlet:param>
    </portlet:renderURL>
    <liferay-ui:icon image="edit" message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions.edit","Sua") %>'  url="<%= updateProfileURL.toString() %>" />
    
    <portlet:actionURL name="deleteProfile" var="deleteProfileURL">
      <portlet:param name="idHoso" value="<%= primKey %>" />
    </portlet:actionURL>
    <liferay-ui:icon image="delete" message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions.delete","Xoa") %>'  url="<%= deleteProfileURL.toString() %>" />
    
    <portlet:renderURL windowState="normal" var="viewInfoEmployeeURL">
      <portlet:param name="idHoso" value="<%= primKey %>" />
		<portlet:param name="jspPage" value="/html/manage_employee/employee/info_employee/info_employee.jsp"></portlet:param>
    </portlet:renderURL>
    <liferay-ui:icon image="view_users" message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions.delete","Dien bien") %>'  url="<%= viewInfoEmployeeURL.toString() %>" />
    
    <c:if test='<%= userId.equals("0")%>'>
	<portlet:renderURL windowState="normal" var="addUserNameURL">
		<portlet:param name="idHoso" value="<%= primKey %>"/>
		<portlet:param name="jspPage" value="/html/manage_employee/employee/assign_user.jsp"></portlet:param>
	</portlet:renderURL>
    <liferay-ui:icon image="join" message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions.edit","Add UserName") %>' url="<%= addUserNameURL.toString() %>" />
	</c:if>    
	
	<c:if test='<%= !com.liferay.portal.kernel.util.Validator.equals(userId, "0")%>'>
	<portlet:actionURL windowState="normal" name="removeUserName" var="removeUserNameURL">
		<portlet:param name="idHoso" value="<%= primKey %>"/>
	</portlet:actionURL>
    <liferay-ui:icon image="leave" message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions.edit","Remove UserName") %>' url="<%= removeUserNameURL.toString() %>" />
	</c:if> 
</liferay-ui:icon-menu>








<%-- <liferay-ui:icon-menu message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions","Tac vu") %>'> --%>
<%-- <c:if test='<%= profileId.equals("0") || com.liferay.portal.kernel.util.Validator.isNull(profileId) %>'> --%>
<%-- 	<portlet:renderURL windowState="normal" var="addProfileURL"> --%>
<%-- 		<portlet:param name="userId" value="<%= primKey %>"/> --%>
<%-- 		<portlet:param name="jspPage" value="/html/manage_employee/employee/add_profile.jsp"></portlet:param> --%>
<%-- 	</portlet:renderURL> --%>
<%--     <liferay-ui:icon image="add" message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions.edit","Add Profile") %>' url="<%= addProfileURL.toString() %>" /> --%>
<%-- </c:if>     --%>

<%-- <c:if test='<%= !com.liferay.portal.kernel.util.Validator.equals(profileId, "0") %>'> --%>
<%--     <portlet:renderURL windowState="normal" var="editProfileURL"> --%>
<%-- 		<portlet:param name="userId" value="<%= primKey %>"/> --%>
<%-- 		<portlet:param name="jspPage" value="/html/manage_employee/employee/edit_profile.jsp"></portlet:param> --%>
<%-- 	</portlet:renderURL> --%>
<%--     <liferay-ui:icon image="edit" message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions.edit","Edit Profile") %>' url="<%= editProfileURL.toString() %>" /> --%>
    
<%--     <portlet:actionURL name="deleteProfile" var="deleteProfileURL"> --%>
<%--       <portlet:param name="userId" value="<%= primKey %>" /> --%>
<%--     </portlet:actionURL> --%>
<%--     <liferay-ui:icon image="delete" message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions.delete","Delete Profile") %>'  url="<%= deleteProfileURL.toString() %>" /> --%>
    
<%--     <portlet:renderURL windowState="normal" var="viewInfoEmployeeURL"> --%>
<%--       <portlet:param name="userId" value="<%= primKey %>" /> --%>
<%-- 		<portlet:param name="jspPage" value="/html/manage_employee/employee/info_employee/info_employee.jsp"></portlet:param> --%>
<%--     </portlet:renderURL> --%>
<%--     <liferay-ui:icon image="view_users" message='<%=LanguageUtil.get(pageContext, "managecontacts.agency.view-actions.delete","View Info") %>'  url="<%= viewInfoEmployeeURL.toString() %>" /> --%>
<%-- </c:if> --%>
<%-- </liferay-ui:icon-menu> --%>





